﻿using System;
using System.Data;
using PPI.General;
using PPI.WebConsumer.PPI.Svc;

namespace PPI.WebConsumer
{
    public class WReport
    {
        public static DataSet GetReportPolesByAge(int projectId)
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();
            
            return svc.Report_GetReportPolesByAge(projectId, reader.ConectionMode);
        }
        public static DataSet GetReportVisitsByTop(int projectId)
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();
            
            return svc.Report_GetReportVisitsByTop(projectId, reader.ConectionMode);
        }
        public static DataSet GetReportVisitsByWeekContact()
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();

            return svc.Report_GetReportVisitByWeekContact(reader.ConectionMode);
        }

        public static DataSet GetReportInspectionsByWeekContact()
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();

            return svc.Report_GetReportInspectionsByWeekContact(reader.ConectionMode);
        }

        public static DataSet GetReportInspectionsTypeByWeekInspector()
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();
            
            return svc.Report_GetReportInspectionsTypeByWeekInspector(reader.ConectionMode);
        }

        public static DataSet GetReportInspectionsTypeByWeekInspector(int projectId)
        {
            ConfigReader reader = ConfigReader.GetInstance();
            PPI.Svc.Service1 svc = new PPI.Svc.Service1();

            return svc.Report_GetReportInspectionsTypeByWeekInspectorByProject(projectId, reader.ConectionMode);
        }

        public static DataSet GetReportDistributionInspectionsTypeByWeekInspector()
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();
            
            return svc.Report_GetReportDistributionInspectionsTypeByWeekInspector(reader.ConectionMode);
        }

        public static DataSet GetReportProjectSummary()
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();

            return svc.Report_GetReportProjectSummary(reader.ConectionMode);
        }

        public static DataSet GetReportProjectSummary(int projectId)
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();

            return svc.Report_GetReportProjectSummaryByProject(projectId, reader.ConectionMode);
        }

        public static DataSet GetReportDistributionInspectionProjectSummary()
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();
            return svc.Report_GetReportDistributionInspectionProjectSummary(reader.ConectionMode);

            
            //PPILocal.Service1 d = new PPILocal.Service1();
            //return d.Report_GetReportDistributionInspectionProjectSummary(reader.ConectionMode);
        }

        public static DataSet GetReportLineProblemsByResultAndNote()
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();
            
            return svc.Report_GetReportLineProblems(reader.ConectionMode);
        }

        public static DataSet GetReportIssueByResult()
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();
            
            return svc.Report_GetReportIssueByResult(reader.ConectionMode);
        }

        public static DataSet GetReportAssetDescription(Int32 assetId)
        {
            ConfigReader reader = ConfigReader.GetInstance();
            Service1 svc = new Service1();

            return svc.Report_GetAssetDescription(assetId, reader.ConectionMode);
        }
    }
}
